package com.cxj.link.task;

import com.cxj.link.Setting;
import com.cxj.link.view.GameLogicImpl;
import com.cxj.link.vo.GameConfig;

public class TaskGameServiceImpl extends GameLogicImpl {
    public TaskGameServiceImpl(GameConfig paramGameConf) {
        super(paramGameConf);
    }

    @Override
    public void start() {
        switch (Setting.level2) {
        default:
            Setting.level2 = 0;
            this.board = new Level1();
            this.config = LevelManager.getLevel(Setting.level2);
            break;
        case 0:
            this.board = new Level1();
            break;
        case 1:
            this.board = new Level2();
            break;
        case 2:
            this.board = new Level3();
            break;
        case 3:
            this.board = new Level4();
            break;
        case 4:
            this.board = new Level5();
            break;
        case 5:
            this.board = new Level6();
            break;
        case 6:
            this.board = new Level7();
            break;
        case 7:
            this.board = new Level8();
            break;
        case 8:
            this.board = new Level9();
            break;
        case 9:
            this.board = new Level10();
        }
        this.pieces = this.board.create(this.config);
    }
}